<template>
  <aside class="layout_aside">
    <el-menu
      router
      :default-active="active"
      class="el-menu-vertical-demo"
      background-color="#001529"
      text-color="#fff"
      active-text-color="#1890ff">
      <el-menu-item index="/home">
        <i class="el-icon-menu"></i>
        <span slot="title">首页</span>
      </el-menu-item>
      <el-menu-item index="/table-template">
        <i class="el-icon-menu"></i>
        <span slot="title">表格模板</span>
      </el-menu-item>
    </el-menu>
  </aside>
</template>

<script>
export default {
  name: 'LayoutAside',
  data() {
    return {
      active:'',
    }
  },
  mounted(){
    const { link } = this.$route.meta
    this.active = link
  },
  methods: {

  }
}
</script>

<style lang="scss" scoped>
.layout_aside {
  width: 100%;
  height: 100%;
  background-color: #001529;

  & > .el-menu {
    border-right: none;
    .el-menu-item, .el-submenu__title{
      height: 45px;
      line-height: 45px;
    }

    .el-menu-item:focus, .el-menu-item:hover {
      color: #1890ff !important;
      background-color: #001529 !important;
    }

    .is-active {
      background-color: #1890ff !important;
      color: #fff !important;

      &:focus,&:hover {
        background-color: #1890ff !important;
        color: #fff !important;
      }

    }
  }
}

</style>
